package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 投诉表
 *
 * @author wangtao
 * @since 2022-12-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_complaint")
@Schema(name = "EduComplaint", title = "投诉表", description = "投诉表实体类")
public class EduComplaint extends Model<EduComplaint> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "complaintId", title = "投诉表主键")
    @TableId(value = "complaint_id", type = IdType.ASSIGN_UUID)
    private String complaintId;

    @Schema(name = "complainantId", title = "投诉人personId")
    @TableField(value = "complainant_id")
    private Long complainantId;

    @Schema(name = "type", title = "投诉类型")
    @TableField(value = "type")
    private String type;

    @Schema(name = "content", title = "投诉与反馈内容")
    @TableField(value = "content")
    private String content;

    @Schema(name = "complainantPhone", title = "投诉人联系电话")
    @TableField(value = "complainant_phone")
    private String complainantPhone;

    @Schema(name = "complainantName", title = "投诉人姓名")
    @TableField(value = "complainant_name")
    private String complainantName;

    @Schema(name = "otherId", title = "投诉关联表主键id")
    @TableField(value = "other_id")
    private String otherId;

    @Schema(name = "handlerId", title = "处理人userId")
    @TableField(value = "handler_id")
    private String handlerId;

    @Schema(name = "handleTime", title = "处理时间")
    @TableField(value = "handle_time")
    private Date handleTime;

    @Schema(name = "result", title = "处理人意见")
    @TableField(value = "result")
    private String result;

    @Schema(name = "handleStatus", title = "处理状态")
    @TableField(value = "handle_status")
    private String handleStatus;

    @Schema(name = "handlerName", title = "处理人姓名")
    @TableField(value = "handler_name")
    private String handlerName;
    @Schema(name = "文件材料信息")
    @TableField(value = "file_info")
    private String fileInfo;
    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "updateName", title = "更新人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "del", title = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "year", title = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "areaCode", title = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;


    @Override
    public Serializable pkVal() {
        return this.complaintId;
    }
}
